package com.platform.hjt.sys.model.json;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import org.codehaus.jackson.JsonGenerator;
import org.codehaus.jackson.JsonProcessingException;
import org.codehaus.jackson.map.JsonSerializer;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.SerializerProvider;

import com.platform.hjt.sys.model.SysUserInfo;

public class SysUserInfoSerialize extends JsonSerializer<SysUserInfo>{

	@Override
	public void serialize(SysUserInfo user, JsonGenerator jgen,
			SerializerProvider provider) throws IOException,
			JsonProcessingException {
		
		ObjectMapper om = new ObjectMapper();
		Map<String, String> map = new HashMap<String, String>();
		map.put("sysUserInfoId", user.getSysUserInfoId());
		map.put("userName", user.getUserName());
		om.writeValue(jgen, map);
	}

}
